package com.gw.controller;

import com.gw.common.model.Admin;
import com.gw.base.BaseController;
import com.gw.validator.AdminLoginValidator;
import com.jfinal.aop.Before;

public class AdminLogin extends BaseController{
	public void index(){
		render("login.html");
	}
	@Before(AdminLoginValidator.class)
	public void doLogin(){
		Admin admin=getAttr("admin");
		setSessionAttr(Admin.LOGINSESSION, admin);
		redirect("/admin");
	}
}
